package 第偶数个为负的叠加;

public class Solution
{
    public int method(int n){
        if(n==1)return 1;
        if(n%2==0)return method(n-1)-n;
        else return method(n-1)+n;
    }

    public static void main(String[] args) {
        Solution solution = new Solution();
        System.out.println(solution.method(5));
    }
}
